<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<html>
<head>
<link rel="STYLESHEET" href="lib.css" type='text/css' />
<link rel="SHORTCUT ICON" href="../icons/pyfav.png" type="image/png" />
<link rel='start' href='../index.html' title='Python documentation Index' />
<link rel="first" href="lib.html" title='Python library Reference' />
<link rel='contents' href='contents.html' title="Contents" />
<link rel='index' href='genindex.html' title='Index' />
<link rel='last' href='about.html' title='About this document...' />
<link rel='help' href='about.html' title='About this document...' />
<link rel="prev" href="pyzipfile-objects.html" />
<link rel="parent" href="module-zipfile.html" />
<link rel="next" href="module-tarfile.html" />
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<meta name='aesop' content='information' />
<title>12.4.3 ZipInfo Objects </title>
</head>
<body>
<div class="navigation">
<div id='top-navigation-panel' xml:id='top-navigation-panel'>
<table align="center" width="100%" cellpadding="0" cellspacing="2">
<tr>
<td class='online-navigation'><a rel="prev" title="12.4.2 pyzipfile Objects"
  href="pyzipfile-objects.html"><img src='../icons/previous.png'
  border='0' height='32'  alt='Previous Page' width='32' /></a></td>
<td class='online-navigation'><a rel="parent" title="12.4 zipfile  "
  href="module-zipfile.html"><img src='../icons/up.png'
  border='0' height='32'  alt='Up one Level' width='32' /></a></td>
<td class='online-navigation'><a rel="next" title="12.5 tarfile  "
  href="module-tarfile.html"><img src='../icons/next.png'
  border='0' height='32'  alt='Next Page' width='32' /></a></td>
<td align="center" width="100%">Python Library Reference</td>
<td class='online-navigation'><a rel="contents" title="Table of Contents"
  href="contents.html"><img src='../icons/contents.png'
  border='0' height='32'  alt='Contents' width='32' /></a></td>
<td class='online-navigation'><a href="modindex.html" title="Module Index"><img src='../icons/modules.png'
  border='0' height='32'  alt='Module Index' width='32' /></a></td>
<td class='online-navigation'><a rel="index" title="Index"
  href="genindex.html"><img src='../icons/index.png'
  border='0' height='32'  alt='Index' width='32' /></a></td>
</tr></table>
<div class='online-navigation'>
<b class="navlabel">Previous:</b>
<a class="sectref" rel="prev" href="pyzipfile-objects.html">12.4.2 PyZipFile Objects</a>
<b class="navlabel">Up:</b>
<a class="sectref" rel="parent" href="module-zipfile.html">12.4 zipfile  </a>
<b class="navlabel">Next:</b>
<a class="sectref" rel="next" href="module-tarfile.html">12.5 tarfile  </a>
</div>
<hr /></div>
</div>
<!--End of Navigation Panel-->

<h2><a name="SECTION0014430000000000000000"></a><a name="zipinfo-objects"></a>
<br>
12.4.3 ZipInfo Objects 
</h2>

<p>
Instances of the <tt class="class">ZipInfo</tt> class are returned by the
<tt class="method">getinfo()</tt> and <tt class="method">infolist()</tt> methods of
<tt class="class">ZipFile</tt> objects.  Each object stores information about a
single member of the ZIP archive.

<p>
Instances have the following attributes:

<p>
<dl><dt><b><tt id='l2h-2376' xml:id='l2h-2376' class="member">filename</tt></b></dt>
<dd>
  Name of the file in the archive.
</dl>

<p>
<dl><dt><b><tt id='l2h-2377' xml:id='l2h-2377' class="member">date_time</tt></b></dt>
<dd>
  The time and date of the last modification to the archive
  member.  This is a tuple of six values:

<p>
<div class="center"><table class="realtable">
  <thead>
    <tr>
      <th class="center">Index</th>
      <th class="left"  >Value</th>
      </tr>
    </thead>
  <tbody>
    <tr><td class="center" valign="baseline"><code>0</code></td>
        <td class="left"  >Year</td></tr>
    <tr><td class="center" valign="baseline"><code>1</code></td>
        <td class="left"  >Month (one-based)</td></tr>
    <tr><td class="center" valign="baseline"><code>2</code></td>
        <td class="left"  >Day of month (one-based)</td></tr>
    <tr><td class="center" valign="baseline"><code>3</code></td>
        <td class="left"  >Hours (zero-based)</td></tr>
    <tr><td class="center" valign="baseline"><code>4</code></td>
        <td class="left"  >Minutes (zero-based)</td></tr>
    <tr><td class="center" valign="baseline"><code>5</code></td>
        <td class="left"  >Seconds (zero-based)</td></tr></tbody>
</table></div>
</dl>

<p>
<dl><dt><b><tt id='l2h-2378' xml:id='l2h-2378' class="member">compress_type</tt></b></dt>
<dd>
  Type of compression for the archive member.
</dl>

<p>
<dl><dt><b><tt id='l2h-2379' xml:id='l2h-2379' class="member">comment</tt></b></dt>
<dd>
  Comment for the individual archive member.
</dl>

<p>
<dl><dt><b><tt id='l2h-2380' xml:id='l2h-2380' class="member">extra</tt></b></dt>
<dd>
  Expansion field data.  The
  <em class="citetitle"><a
 href="http://www.pkware.com/business_and_developers/developer/appnote/"
 title="PKZIP Application Note"
 >PKZIP Application Note</a></em> contains some comments on the internal
  structure of the data contained in this string.
</dl>

<p>
<dl><dt><b><tt id='l2h-2381' xml:id='l2h-2381' class="member">create_system</tt></b></dt>
<dd>
  System which created ZIP archive.
</dl>

<p>
<dl><dt><b><tt id='l2h-2382' xml:id='l2h-2382' class="member">create_version</tt></b></dt>
<dd>
  PKZIP version which created ZIP archive.
</dl>

<p>
<dl><dt><b><tt id='l2h-2383' xml:id='l2h-2383' class="member">extract_version</tt></b></dt>
<dd>
  PKZIP version needed to extract archive.
</dl>

<p>
<dl><dt><b><tt id='l2h-2384' xml:id='l2h-2384' class="member">reserved</tt></b></dt>
<dd>
  Must be zero.
</dl>

<p>
<dl><dt><b><tt id='l2h-2385' xml:id='l2h-2385' class="member">flag_bits</tt></b></dt>
<dd>
  ZIP flag bits.
</dl>

<p>
<dl><dt><b><tt id='l2h-2386' xml:id='l2h-2386' class="member">volume</tt></b></dt>
<dd>
  Volume number of file header.
</dl>

<p>
<dl><dt><b><tt id='l2h-2387' xml:id='l2h-2387' class="member">internal_attr</tt></b></dt>
<dd>
  Internal attributes.
</dl>

<p>
<dl><dt><b><tt id='l2h-2388' xml:id='l2h-2388' class="member">external_attr</tt></b></dt>
<dd>
 External file attributes.
</dl>

<p>
<dl><dt><b><tt id='l2h-2389' xml:id='l2h-2389' class="member">header_offset</tt></b></dt>
<dd>
  Byte offset to the file header.
</dl>

<p>
<dl><dt><b><tt id='l2h-2390' xml:id='l2h-2390' class="member">CRC</tt></b></dt>
<dd>
  CRC-32 of the uncompressed file.
</dl>

<p>
<dl><dt><b><tt id='l2h-2391' xml:id='l2h-2391' class="member">compress_size</tt></b></dt>
<dd>
  Size of the compressed data.
</dl>

<p>
<dl><dt><b><tt id='l2h-2392' xml:id='l2h-2392' class="member">file_size</tt></b></dt>
<dd>
  Size of the uncompressed file.
</dl>

<div class="navigation">
<div class='online-navigation'>
<p></p><hr />
<table align="center" width="100%" cellpadding="0" cellspacing="2">
<tr>
<td class='online-navigation'><a rel="prev" title="12.4.2 pyzipfile Objects"
  href="pyzipfile-objects.html"><img src='../icons/previous.png'
  border='0' height='32'  alt='Previous Page' width='32' /></a></td>
<td class='online-navigation'><a rel="parent" title="12.4 zipfile  "
  href="module-zipfile.html"><img src='../icons/up.png'
  border='0' height='32'  alt='Up one Level' width='32' /></a></td>
<td class='online-navigation'><a rel="next" title="12.5 tarfile  "
  href="module-tarfile.html"><img src='../icons/next.png'
  border='0' height='32'  alt='Next Page' width='32' /></a></td>
<td align="center" width="100%">Python Library Reference</td>
<td class='online-navigation'><a rel="contents" title="Table of Contents"
  href="contents.html"><img src='../icons/contents.png'
  border='0' height='32'  alt='Contents' width='32' /></a></td>
<td class='online-navigation'><a href="modindex.html" title="Module Index"><img src='../icons/modules.png'
  border='0' height='32'  alt='Module Index' width='32' /></a></td>
<td class='online-navigation'><a rel="index" title="Index"
  href="genindex.html"><img src='../icons/index.png'
  border='0' height='32'  alt='Index' width='32' /></a></td>
</tr></table>
<div class='online-navigation'>
<b class="navlabel">Previous:</b>
<a class="sectref" rel="prev" href="pyzipfile-objects.html">12.4.2 PyZipFile Objects</a>
<b class="navlabel">Up:</b>
<a class="sectref" rel="parent" href="module-zipfile.html">12.4 zipfile  </a>
<b class="navlabel">Next:</b>
<a class="sectref" rel="next" href="module-tarfile.html">12.5 tarfile  </a>
</div>
</div>
<hr />
<span class="release-info">Release 2.5.1, documentation updated on 18th April, 2007.</span>
</div>
<!--End of Navigation Panel-->
<address>
See <i><a href="about.html">About this document...</a></i> for information on suggesting changes.
</address>
</body>
</html>
